package com.demo.feign.config;

import org.springframework.cache.CacheManager;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author gx
 */
@Configuration
public class CacheConfig {
    /**
     * 定义一个名为 cache 的缓存
     * */
    @Bean
    public CacheManager cacheManager(){
        ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager("cache");
        return cacheManager;
    }
}
